package br.com.provas;
// Generated 20/10/2014 17:01:06 by Hibernate Tools 4.3.1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbTurma generated by hbm2java
 */
@Entity
@Table(name="tb_turma"
    ,catalog="bd_provas"
)
public class TbTurma  implements java.io.Serializable {


     private Integer idTurma;
     private TbAluno tbAluno;
     private String descricaoTurma;
     private Integer idCurso;
     private Integer idDisciplina;
     private Set tbDisciplinas = new HashSet(0);

    public TbTurma() {
    }

    public TbTurma(TbAluno tbAluno, String descricaoTurma, Integer idCurso, Integer idDisciplina, Set tbDisciplinas) {
       this.tbAluno = tbAluno;
       this.descricaoTurma = descricaoTurma;
       this.idCurso = idCurso;
       this.idDisciplina = idDisciplina;
       this.tbDisciplinas = tbDisciplinas;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idTurma", unique=true, nullable=false)
    public Integer getIdTurma() {
        return this.idTurma;
    }
    
    public void setIdTurma(Integer idTurma) {
        this.idTurma = idTurma;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="idAluno")
    public TbAluno getTbAluno() {
        return this.tbAluno;
    }
    
    public void setTbAluno(TbAluno tbAluno) {
        this.tbAluno = tbAluno;
    }

    
    @Column(name="descricaoTurma")
    public String getDescricaoTurma() {
        return this.descricaoTurma;
    }
    
    public void setDescricaoTurma(String descricaoTurma) {
        this.descricaoTurma = descricaoTurma;
    }

    
    @Column(name="idCurso")
    public Integer getIdCurso() {
        return this.idCurso;
    }
    
    public void setIdCurso(Integer idCurso) {
        this.idCurso = idCurso;
    }

    
    @Column(name="idDisciplina")
    public Integer getIdDisciplina() {
        return this.idDisciplina;
    }
    
    public void setIdDisciplina(Integer idDisciplina) {
        this.idDisciplina = idDisciplina;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="tbTurma")
    public Set getTbDisciplinas() {
        return this.tbDisciplinas;
    }
    
    public void setTbDisciplinas(Set tbDisciplinas) {
        this.tbDisciplinas = tbDisciplinas;
    }




}


